package top.yaofengqiao.springcloudsimple.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ResponseCode {

    SUCCESS(200, "success"),
    UN_ERROR(500, "internal service error!"),
    // 未认证
    NO_AUTHENTICATION(401, "Authentication Error!"),
    // 未授权
    UNAUTHORIZED(403, "Authorized Error!"),

    // ================账户相关错误码100_000开始================
    USER_NOT_EXIST_ERROR(100_000, "用户不存在"),
    USER_NO_LOGIN_ERROR(100_001, "用户未登录"),
    USER_OR_PWD_ERROR(100_002, "用户名或密码错误"),
    USER_LOCK(100_003, "账户被锁定"),
    CHECK_CODE_ERROR(100_004, "验证码错误"),
    INVALID_TOKEN(100_005, "无效token"),
    DEVICE_EXCEPTION(100_006, "登录设备异常"),
    REGISTER_FAIL(100_007, "注册失败"),
    ALIPAY_LOGIN_FAIL(100_008, "支付宝登录异常"),
    // 认证用户类型错误
    USER_TYPE_NOT_EXIST(100_009, "UserType不存在"),
    LOGIN_MODE_NO_SUPPORT(100_010, "登录方式不支持"),

    // ================参数异常200_000开始================
    ILLEGAL_PARAMETER(200_000, "非法参数"),

    // ================支付相关异常600_000开始================
    PAY_APPLY_FAIL(600_000, "支付申请失败"),
    NOT_SUPPORT_PAY_CHANEL(600_001, "不支持的支付类型"),
    NOT_SUPPORT_PAY_TYPE(600_002, "不支持的支付类型"),

    // ================消息相关异常700_000开始================
    MQ_MESSAGE_SEND_FAIL(700_000, "MQ消息发送失败"),
    SMS_PLATFORM_NOT_SUPPORT(700_001, "不支持的短信平台"),
    ;

    private Integer code;
    private String info;

}
